<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="renderer" content="webkit"/>
  <meta name="force-rendering" content="webkit"/>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
  <title>我的后台</title>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
  <link rel="stylesheet" href="/bower_components/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="/bower_components/Ionicons/css/ionicons.min.css">
  <link rel="stylesheet" href="/dist/css/AdminLTE.min.css">
  <link rel="stylesheet" href="/dist/css/skins/_all-skins.min.css">
  <link rel="stylesheet" href="/bower_components/morris.js/morris.css">
  <link rel="stylesheet" href="/bower_components/jvectormap/jquery-jvectormap.css">
  <link rel="stylesheet" href="/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
  <link rel="stylesheet" href="/bower_components/bootstrap-daterangepicker/daterangepicker.css">
  <link rel="stylesheet" href="/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">

  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
  <!-- Google Font -->
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

  <!--头部-->
  <header id="headerDiv" class="main-header">
    <!--#include  file="header.html"-->
  </header>

  <!--左侧边栏 -->
  <aside id="sidebarDiv" class="main-sidebar">
    <!--#include  file="sidebar.html"-->
  </aside>

  <!-- 右侧content主体 -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        平台概况
      </h1>
      <ol class="breadcrumb">
        <li><i class="fa fa-dashboard"></i> 主页</li>
        <li class="active">平台概况</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
      <!-- Info boxes -->
      <div class="row">
        <div style="background: #eaeaea;margin: 15px;">
          <p style="padding: 5px;">会员发展链接：<span id="rurl"></span></p>
        </div>

        <div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-aqua"><i class="fa fa-yen"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">总收益</span>
              <span class="info-box-number" id="money"></span>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>
        <!-- /.col -->
        <div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-red"><i class="fa fa-yen"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">本周收益</span>
              <span class="info-box-number" id="week_money"></span>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>
        <!-- /.col -->

        <!-- fix for small devices only -->
        <div class="clearfix visible-sm-block"></div>

        <div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-green"><i class="fa fa-yen"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">周下线提成</span>
              <span class="info-box-number" id="xmoney"></span>
            </div>
            <!-- /.info-box-content -->
          </div>
          <!-- /.info-box -->
        </div>


        <!-- /.col -->
        <!--<div class="col-md-3 col-sm-6 col-xs-12">
          <div class="info-box">
            <span class="info-box-icon bg-yellow"><i class="fa fa-yen"></i></span>

            <div class="info-box-content">
              <span class="info-box-text">本月收入</span>
              <span class="info-box-number">2,000</span>
            </div>
            &lt;!&ndash; /.info-box-content &ndash;&gt;
          </div>
          &lt;!&ndash; /.info-box &ndash;&gt;
        </div>-->
        <!-- /.col -->
      </div>
      <!-- /.row -->


      <div class="row">
        <!-- Small boxes (Stat box) -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-aqua">
            <div class="inner">
              <h3 id="views">NaN</h3>

              <p>浏览数</p>
            </div>
            <div class="icon">
              <i class="fa fa-area-chart"></i>
            </div>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-green">
            <div class="inner">
              <h3 id="clicks">NaN</h3>

              <p>点击数</p>
            </div>
            <div class="icon">
              <i class="fa fa-area-chart"></i>
            </div>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-yellow">
            <div class="inner">
              <h3 id="ips">NaN</h3>

              <p>UV量</p>
            </div>
            <div class="icon">
              <i class="ion ion-person-add"></i>
            </div>
          </div>
        </div>
        <!-- ./col -->
        <div class="col-lg-3 col-xs-6">
          <!-- small box -->
          <div class="small-box bg-red">
            <div class="inner">
              <h3 id="crt">65<sup style="font-size: 20px">%</sup></h3>

              <p>点击率</p>
            </div>
            <div class="icon">
              <i class="ion ion-pie-graph"></i>
            </div>
          </div>
        </div>
        <!-- ./col -->
        <!-- /.row -->
        <!-- /.col -->
      </div>
      <!-- /.row -->


    </section>
    <!-- /.content -->
  </div>

  <!--底部-->
  <footer id="footerDiv" class="main-footer">
    <!--#include  file="footer.html"-->
  </footer>

</div>
<!-- ./wrapper -->
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/bower_components/morris.js/morris.min.js"></script>
<script src="/bower_components/jquery-ui/jquery-ui.min.js"></script>

<script src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="/bower_components/raphael/raphael.min.js"></script>
<script src="/bower_components/jquery-sparkline/dist/jquery.sparkline.min.js"></script>
<script src="/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
<script src="/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
<script src="/bower_components/jquery-knob/dist/jquery.knob.min.js"></script>
<script src="/bower_components/moment/min/moment.min.js"></script>
<script src="/bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
<script src="/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
<script src="/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<script src="/bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<script src="/bower_components/fastclick/lib/fastclick.js"></script>
<script src="/dist/js/adminlte.min.js"></script>
<!--<script src="dist/js/pages/dashboard.js"></script>-->


<script>
    $(function () {


        let url="/lmgame/channel/getInfo";
        $.ajax({
            type : 'POST',
            url : url,
            dataType : "json",
            success: function(data) {
                if(data.code!=0){
                    layer.msg(data.msg);
                    window.location.href = "/index2.html";
                    return;
                }
                $("#money").html(data.data.money);
                $("#week_money").html(data.data.week_money);
                $("#xmoney").html(data.data.xmoney);

                $("#views").html(data.data.views);
                $("#crt").html(data.data.crt+"%");
                $("#clicks").html(data.data.xmoney);
                $("#ips").html(data.data.ips);

                var domain = window.location.host;
                $("#rurl").html("<a>https://"+domain+"/pages/channel/register.html?rid="+data.data.id+"</a>");
            },
            error: function(xhr, ts, et) { //XMLHttpRequest, textStatus, errorThrown
                if (xhr.status === 400) {
                    window.location.href = "/pages/channel/login.html";
                }
                if (xhr.status === 403) {
                    window.location.href = "/403.html";
                }
            }
        });
    });

</script>
</body>
</html>
